package com.barneyx.mshinfoplatform.web.admin;

import com.barneyx.mshinfoplatform.common.ExResult;
import com.barneyx.mshinfoplatform.exception.MshException;
import com.barneyx.mshinfoplatform.util.InfoUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/admin/info/advertising/")
public class AdvertisingController {
    @Resource
    private InfoUtil.Setting infoSettingUtil;


    @GetMapping("advertising")
    public ExResult getAreaAdvertising() throws MshException {
        return ExResult.ofAuto(infoSettingUtil.getAdvList());
    }
}
